#include <iostream>
#include <conio.h>

int main()
{
		int array_size = 0,
			multiplay = 1,
			count_sequence = 0;
		int *vect;
        
        do{
                std::cout << "how many members would you like = " ;
                std::cin >> array_size;
				std::cout << "how many sequence members would you like = " ;
                std::cin >> count_sequence;
                if((array_size <= 1) || (count_sequence > array_size))
                {
                        std::cout << "your input number most be greater then 1 or you count sequence grater then array_size" << std::endl;
                }
        }
        while((array_size <= 1) || (count_sequence > array_size));
        vect= new  int[array_size];
        for(int i = 0 ; i < array_size ; ++i)
        {
                std::cout << "vect[" << i << "] = ";
                std::cin >>vect[i];
        } 

		for(int next = 1 ; next < array_size ; ++next )
		{
			int insert = vect[next];
			int move_item = next;
			while((move_item > 0) && (vect[move_item - 1] > insert))
			{
				vect[move_item] = vect [move_item - 1];
				move_item--;
			}
			vect[move_item] = insert;
		}
		std::cout << "chose lengt this count of nubers multiplay are the beggest" << std::endl;
		for(int i = (array_size - count_sequence) ; i < array_size ; ++i)
		{
			std::cout << vect[i] << std::endl;
			multiplay *= vect[i];
		}
		std::cout << "multiplay = " << multiplay << std::endl;

		delete [] vect;
		getch();
		return 0;

}